import java.io.*;

public class demo12 {
    public static void main(String[] args) throws IOException {
        try(OutputStream outputStream=new FileOutputStream("d:/test.txt")) {
            PrintWriter writer=new PrintWriter(outputStream);
            writer.println("hello");
            writer.flush();
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
